home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / acpid.postinst < prev    next >
Text File  |  2009-09-23  |  978b  |  39 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. # Remove shutdown and reboot links; this init script does not need them.
  6. if dpkg --compare-versions "$2" lt "1.0.4-5ubuntu2"; then
  7.     rm -f /etc/rc0.d/K21acpid /etc/rc6.d/K21acpid
  8. fi
  9.  
  10. HAL_NEEDS_RESTARTING=no
  11. case "$1" in
  12.   configure|reconfigure)
  13.     # 
  14.     if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ -f /var/run/hald/hald.pid ]; then
  15.       HAL_NEEDS_RESTARTING=yes
  16.       invoke-rc.d hal stop
  17.     fi
  18.     ;;
  19. esac
  20.  
  21. # Automatically added by dh_installinit
  22. if [ -e "/etc/init/acpid.conf" ]; then
  23.     # start fails is already running
  24.     start acpid || :
  25. fi
  26. # End automatically added section
  27. # Automatically added by dh_installinit
  28. update-rc.d -f acpid remove >/dev/null || exit $?
  29. # End automatically added section
  30.  
  31.  
  32. case "$1" in
  33.   configure|reconfigure)
  34.     if [ -x /etc/init.d/hal ]  && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then
  35.       invoke-rc.d hal start
  36.     fi
  37.     ;;
  38. esac
  39.